<%= javascript_include_tag "facebooker","append" %>
<%= stylesheet_link_tag "base","rails","form","lister","box","tabs" %>
<style type="text/css">
ul {
  padding:0px;
  margin:0px;
}

.background-top
{
  background: transparent url(<%= facebook_image_url 'TopBG.png' %>) no-repeat
}

.clearfix /* tabs background color */
{
    background-color:#f2f2f2;
}

.background-mid
{
    background-color:#f2f2f2;
    padding-bottom:25px;
}

.prizes {
  
}
.prize {
  width:47.5%;
  float:left;
  height:150px;
  margin:6px;
  overflow:hidden;
  border:1px solid #D8DFEA;
}

.prize-pic {
  float:left;
  width:53%;
  padding-left:10px;
}

.prize-desc,.prize-description {
  float:left;
  padding-top:55px;
  width:40%;
  text-align:center;
}

.prize-hover {
  background-color:#eee;
}

.prize-selected {
  background-color:#ffa;
}

.change-prize {
  padding:10px 0 10px 10px;
}

.header img {
  width:200px;
  height:65px;
  margin:0px auto;
}

.current-streak {
  background-color:#FFE59F;
  text-align:center;
  padding:32px;
  padding-bottom:0px;
  margin:8px 0 0 8px;
}

.home-layout{
  text-align:left;
  width:95.5%;
  padding:10px;
  margin:8px 0 0 8px;
}

.current-streak h6 {
  font-size:21px;
  font-weight:bold;
  padding:2px;
  margin:0px;
  display:inline-block; 
  vertical-align:middle;
}

.current-streak .change-prize {
  text-align:right;
}


.place-bets {
  display:block;
  padding:13px 0 0;
  color:white;
  font-weight:bold;
  margin:10px 7px 0 0;
  text-align:center;
  height: 32px;
  border: 2px solid #226F14;
}

.reset-bets {
  display:block;
  padding:5px 0 0 0;
  margin:7px 7px 20px 0;
  text-align:center;
  color:white;
  height: 19px;
  border: 2px solid #FF8F35;
}

.buy-wins {
  display:block;
  padding:5px 0 0 0;
  margin:4px;
  text-align:center;
  color:white;
  height: 19px;
  border: 2px solid #FF8F35;
}

.team-hover {
  background-color:#C6C6C6;
}

.team-selected {
  background-color:#FFF997;
}

.bet-selected {
  background-color:#E7FBC8;
}

.leagues {
  border:1px dotted #D8DFEA;
  margin-right: 5px;
}

table.lister table.no-lister td {
  border:0px;
  padding:0px;
  margin:0px;
}

.filter {
  margin:5px 7px 0 0;
  border:1px dotted #D8DFEA;
  background: #FFF;
}

.filter li {
  padding: 4px;
}

.filter td {
  padding: 4px;
}

.filter .selected,
table.lister thead tr th,
.tab td span a {
  background: transparent url(<%= facebook_image_url 'green_header.gif' %>) repeat-x scroll 0% 0%;
}

.filter .selected,
table.lister thead tr th,
.tab li span a {
  background: transparent url(<%= facebook_image_url 'green_header.gif' %>) repeat-x scroll 0% 0%;
}

.filter td.selected a {
  color:white;
  font-weight:bold;
  padding: 2px;
}

.filter li.selected a {
  color:white;
  font-weight:bold;
  padding: 2px;
}

.key {
  border:1px dotted #D8DFEA;
  padding:5px;
  margin:8px 7px 0 0;
  background:#e6e6e6;
}

.key td {
  padding: 5px;
  font-size: 10px;
}

span.bet-spread {
  font-size:14px;
}

.winstreak-goal {
  padding:30px 35px;
  background: transparent url(<%= facebook_image_url "winner.png" %>) no-repeat scroll 0% 0%;
}

div.tab {
  border-bottom: 1px solid #40962D;
}

.boldfont {
  font-weight:bold;
}

.center {
  text-align: center;
}

</style>

<div class="background-top">
<div class="header">

<div class="clear">
  <div class="right">
<table><tr><td>
  <%=link_to image_tag("become_a_fan.png",:border=>0,:style=>"width:130px;height:20px;"),"http://www.facebook.com/apps/application.php?id=48157641773"%>
</td><td>
  <fb:add-section-button section="info" />
  <fb:add-section-button section="profile" />
</td></tr></table>
  </div>
</div>

<table width="100%">
  <tr>
    <td><center>
	<!-- Place following iframe where you would like the ad to appear -->
	<fb:iframe frameborder='0' scrolling='no' marginheight='0' marginwidth='0' width='645' height='75' src='http://adparlor.com/serveIFrameAd.aspx?appId=5307783&adtype=6&adTBG=EEEEEE&adTColor=0000000&adCntColor=000000&adBG=EEEEEE' id='AdParlorAd'></fb:iframe>
  </center></td>
 </tr>
</table>
</br>
<table width="100%">
  <tr>
    <td width="30%">
      <%= link_to(image_tag('logo.png'),root_path) %>
    </td>
    <td width="70%">
      <%= render :partial=>"winstreaks/stat",:locals=>{:user=>current_user} %>
    </td>
  </tr>
</table>
</div>
</div>

<% unless params[:controller] =~ /^admin\// %>
<% fb_tabs do %>
<%= fb_tab_item2 lambda{params[:controller] == "bets" && params[:type] == nil},'Current Bets',bets_path %>
<%= fb_tab_item2 :buy_wins,'Earn',buy_wins_path %>
<% Sport.all(:order=>"position asc").each do |sport| %>
<%= fb_tab_item2 lambda{params[:controller] == "sports" && params[:id] == sport.id.to_s },sport.name,sport_path(sport) %>
<% end %>
<%= fb_tab_item2 :users,'Leaderboards',users_path %>
<%= fb_tab_item2 ['winstreaks','history'],'History',history_winstreaks_path %>
<%= fb_tab_item2 :help,'Help',"http://apps.facebook.com/thirteenwins/help" %>
<%= fb_tab_item2 false,'admin',admin_matches_path if current_user.admin?%>
<% end %>

<% else %>

<% fb_tabs do %>
<%= fb_tab_item2 :admin_matches,"Matches",admin_matches_path %>
<%= fb_tab_item2 :admin_bets,"Bets",admin_bets_path %>
<%= fb_tab_item2 :admin_teams,"Teams",admin_teams_path %>
<%= fb_tab_item2 :admin_users,"Users",admin_users_path %>
<%= fb_tab_item2 :admin_sports,"Sports",admin_sports_path %>
<%= fb_tab_item2 :admin_prizes,"Prizes",admin_prizes_path %>
<%= fb_tab_item2 :admin_countries,"Countries",admin_countries_path %>
<%= fb_tab_item2 :admin_leagues,"Leagues",admin_leagues_path %>
<%= fb_tab_item2 :admin_point_configs,"WinPoints",admin_point_configs_path %>
<%= fb_tab_item2 false,'Return to App',bets_path %>
<% end %>

<% end %>
<%=kt_track_page_view%>


